import request from "@/utils/request";
import cfg from "@/config/config";

const userVacation = {
  //人员假期列表
  vacationList: param => {
    return request("post", cfg.apiUrl + "api/vacation/vacationList", param);
  },
  //修改
  updateJqInfo: param => {
    return request("post", cfg.apiUrl + "api/vacation/updateJqInfo", param);
  },
  //清零当年法定年假
  fdClearingZero: param => {
    return request("post", cfg.apiUrl + "api/vacation/fdClearingZero", param);
  },
  //清零当年福利年假
  flClearingZero: param => {
    return request("post", cfg.apiUrl + "api/vacation/flClearingZero", param);
  },
  //设置调休上限
  setLimit: param => {
    return request("post", cfg.apiUrl + "api/vacation/setLimit", param);
  },
  //锁定假期
  sockVacation: param => {
    return request("post", cfg.apiUrl + "api/vacation/sockVacation", param);
  },
  //录入
  luRuVacation: param => {
    return request("post", cfg.apiUrl + "api/vacation/luRuVacation", param);
  },
  //年假导入模板
  downLoadTemplate: param => {
    return request("post", cfg.apiUrl + "api/vacation/downLoadTemplate", param);
  },
  //年假导入
  upJiaQiExcel: param => {
    return request("post", cfg.apiUrl + "api/vacation/upJiaQiExcel", param);
  },
  //查询全局保存法定年假、福利年假清0时间设置 fdNjClearDate:法定年假清0时间. flNjCleaDate:福利年假清0时间
  getfdflNjClearDate: () => {
    return request("get", cfg.apiUrl + "api/vacation/getfdflNjClearDate");
  },
  //全局定义增加法定年假、福利年假清0时间设置后端接口 fdNjClearDate:法定年假清0时间. flNjCleaDate:福利年假清0时间
  updatefdflNjClearDate: param => {
    return request(
      "post",
      cfg.apiUrl + "api/vacation/updatefdflNjClearDate",
      param
    );
  }
};

export default userVacation;
